package com.beijiteshop.shop.model.api.response

import android.os.Parcelable
import com.google.gson.annotations.SerializedName
import kotlinx.android.parcel.Parcelize

/**
 * @Author LiaoZhongKai
 * @Date 2021/3/9 14:14
 * @Description
 */
data class OrderConfirmBean(
    @SerializedName("coupon")
    var _coupon: List<Coupon>?,
    var address: AddressBean?,
    var needpay: String,
    var good: Good,
    var discounts: String,
    var postage: String
)

@Parcelize
data class Coupon(
    var basePrice: Int,
    var bus_Coupon_UserID: String,
    var couponName: String,
    var couponValue: Float,
    var overtime: String
): Parcelable

data class Good(
    var bus_GoodsID: String,
    var goodName: String,
    var good_Img: String,
    var isSeckill: String,
    var isSellout: String,
    var marketPrice: Double,
    var onSale: Double,
    var sellingPrice: Double
){
    /**
     * 是否售罄 1：售罄 0：未售罄
     */
    fun saleOut(): Boolean = isSellout == "1"
}